<template>
  <div>
    <elm-page-tb>
      <template #top>
        <el-input placeholder="请查询输入内容" size="mini" prefix-icon='el-icon-search' style="width:250px;" v-model="postData.name" clearable></el-input>
        <right>
          <el-button-group>
            <el-button icon="el-icon-search" size="mini" @click="tablebinding()">查询</el-button>
            <elm-open-button url="purchase_edit" title="新增"  width="900" height="80%">新增</elm-open-button>
          </el-button-group>
        </right>
      </template>
      <elm-table url="/business/wms/purchase/GetData" :post-data="postData" :page-size="10" height="100%">
        <el-table-column prop="sys_code_key" label="采购信息号" align="center" header-align="center" width="120"></el-table-column>
        <el-table-column prop="purchase_date" label="采购日期" align="center" header-align="center" :formatter="formatDate" width="120"></el-table-column>
        <el-table-column prop="department_mc" label="申请部门" align="center" header-align="center" width="100"></el-table-column>
        <el-table-column prop="purchaser_name_mc" label="采购负责人" align="center" header-align="center" width="100"></el-table-column>
        <el-table-column prop="supplier_name" label="供应商名称" align="center" header-align="center" width="100"></el-table-column>
        <el-table-column prop="supplier_contact" label="供应商联系方式" align="center" header-align="center" width="120"></el-table-column>
        <el-table-column prop="purchase_order_no" label="采购订单号" align="center" header-align="center" width="100"></el-table-column>
        <el-table-column prop="purchase_amount" label="采购金额" align="right" header-align="center"></el-table-column>
        <el-table-column prop="purpose" label="用途/项目名称" align="center" header-align="center" width="120"></el-table-column>
        <el-table-column prop="delivery_date" label="交货日期" align="center" header-align="center" :formatter="formatDate" width="120"></el-table-column>
        <el-table-column prop="delivery_address" label="收货地点" align="center" header-align="center"></el-table-column>
        <el-table-column prop="notes" label="备注" align="center" header-align="center"></el-table-column>
        <el-table-column fixed="right" label="操作" width="120px" align="center">
          <template v-slot="scope">
            <elm-open-button url="purchase_edit" title="编辑"   width="900" height="80%" :data="{ model: scope.row }" type="text">编辑</elm-open-button>
            <elm-delete-button  type="text" size="mini" url="/business/wms/purchase/Delete" :data="{ id: scope.row.id }">删除</elm-delete-button>
          </template>
        </el-table-column>
      </elm-table>
    </elm-page-tb>
  </div>

</template>

<script>
export default {
  extends: elmVueBase,
  data() {
    return {
      postData: { name: null}
    }
  },
  created() {
  },
  methods: {
  }
}
</script>
